package com.example.demo.controller;

import com.example.demo.entity.Source;
import com.example.demo.mapper.LinearMapper;
import com.example.demo.mapper.ScatterMapper;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/getLinear")
@CrossOrigin
public class LinearController {

    @Resource
    LinearMapper linearMapper;

    @GetMapping("/getDashujuLinear")
    public List<Source> getDashujuLinear() {
        List<Source> sourceList = linearMapper.getDashujuLinear();
        return sourceList;
    }

    @GetMapping("/getJisuanjiyingyongLinear")
    public List<Source> getJisuanjiyingyongLinear() {
        List<Source> sourceList = linearMapper.getJisuanjiyingyongLinear();
        return sourceList;
    }

    @GetMapping("/getRuanjiangongchengLinear")
    public List<Source> getRuanjiangongchengLinear() {
        List<Source> sourceList = linearMapper.getRuanjiangongchengLinear();
        return sourceList;
    }

    @GetMapping("/getRuanjianjishuLinear")
    public List<Source> getRuanjianjishuLinear() {
        List<Source> sourceList = linearMapper.getRuanjianjishuLinear();
        return sourceList;
    }
    @GetMapping("/getWangluogongchengLinear")
    public List<Source> getWangluogongchengLinear() {
        List<Source> sourceList = linearMapper.getWangluogongchengLinear();
        return sourceList;
    }

    @GetMapping("/getWangluojishuLinear")
    public List<Source> getWangluojishuLinear() {
        List<Source> sourceList = linearMapper.getWangluojishuLinear();
        return sourceList;
    }

    @GetMapping("/getWulianwangLinear")
    public List<Source> getWulianwangLinear() {
        List<Source> sourceList = linearMapper.getWulianwangLinear();
        return sourceList;
    }

    @GetMapping("/getXinxiguanliLinear")
    public List<Source> getXinxiguanliLinear() {
        List<Source> sourceList = linearMapper.getXinxiguanliLinear();
        return sourceList;
    }
}
